﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [ExcelExporter(Name = "设备故障")]
    [Table(Name = "shebeiguzhang")]
    public class SheBeiGuZhang
    {
        [IEIgnore(IsExportIgnore = true)]
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "bzsbtid")]
        [JsonProperty("bzsbtid")]
        [Description("保障设备类型ID")]
        public long Bzsbtid { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "bzsbid")]
        [JsonProperty("bzsbid")]
        [Description("保障设备ID")]
        public long Bzsbid { get; set; }

        [ExporterHeader(DisplayName = "装备唯一编码")]
        [Column(Name = "zbwybm")]
        [JsonProperty("zbwybm")]
        [Description("装备唯一编码")]
        public string Zbwybm { get; set; }

        [ExporterHeader(DisplayName = "名称")]
        [Column(Name = "mc")]
        [JsonProperty("mc")]
        [Description("名称")]
        public string Mc { get; set; }

        [ExporterHeader(DisplayName = "型号")]
        [Column(Name = "xh")]
        [JsonProperty("xh")]
        [Description("型号")]
        public string Xh { get; set; }

        [ExporterHeader(DisplayName = "编号（车牌号）")]
        [Column(Name = "bh")]
        [JsonProperty("bh")]
        [Description("编号（车牌号）")]
        public string Bh { get; set; }

        [ExporterHeader(DisplayName = "发现日期", Format = "yyyy-mm-DD")]
        [Column(Name = "fxrq", DbType = "date NOT NULL")]
        [JsonProperty("fxrq")]
        [Description("发现日期")]
        public DateTime Fxrq { get; set; }

        [ExporterHeader(DisplayName = "排除日期", Format = "yyyy-mm-DD")]
        [Column(Name = "pcrq", DbType = "date NOT NULL")]
        [JsonProperty("pcrq")]
        [Description("排除日期")]
        public DateTime Pcrq { get; set; }

        [ExporterHeader(DisplayName = "故障现象")]
        [Column(Name = "gzxx")]
        [JsonProperty("gzxx")]
        [Description("故障现象")]
        public string Gzxx { get; set; }

        [ExporterHeader(DisplayName = "故障原因")]
        [Column(Name = "gzyy")]
        [JsonProperty("gzyy")]
        [Description("故障原因")]
        public string Gzyy { get; set; }

        [ExporterHeader(DisplayName = "故障发生位置")]
        [Column(Name = "gzfswz")]
        [JsonProperty("gzfswz")]
        [Description("故障发生位置")]
        public string Gzfswz { get; set; }

        [ExporterHeader(DisplayName = "故障件名称")]
        [Column(Name = "gzjmc")]
        [JsonProperty("gzjmc")]
        [Description("故障件名称")]
        public string Gzjmc { get; set; }

        [ExporterHeader(DisplayName = "故障件型号")]
        [Column(Name = "gzjxh")]
        [JsonProperty("gzjxh")]
        [Description("故障件型号")]
        public string Gzjxh { get; set; }

        [ExporterHeader(DisplayName = "故障件号码")]
        [Column(Name = "gzjhm")]
        [JsonProperty("gzjhm")]
        [Description("故障件号码")]
        public string Gzjhm { get; set; }

        [ExporterHeader(DisplayName = "故障件装机日期", Format = "yyyy-mm-DD")]
        [Column(Name = "gzjzjrq", DbType = "date NOT NULL")]
        [JsonProperty("gzjzjrq")]
        [Description("故障件装机日期")]
        public DateTime Gzjzjrq { get; set; }

        [ExporterHeader(DisplayName = "故障件工作时间（h）")]
        [Column(Name = "gzjgzsj")]
        [JsonProperty("gzjgzsj")]
        [Description("故障件工作时间（h）")]
        public string Gzjgzsj { get; set; }

        [ExporterHeader(DisplayName = "排除方法")]
        [Column(Name = "pcff")]
        [JsonProperty("pcff")]
        [Description("排除方法")]
        public string Pcff { get; set; }

        [ExporterHeader(DisplayName = "排故人")]
        [Column(Name = "pgr")]
        [JsonProperty("pgr")]
        [Description("排故人")]
        public string Pgr { get; set; }

        [ExporterHeader(DisplayName = "排除工时（h）")]
        [Column(Name = "pggs")]
        [JsonProperty("pggs")]
        [Description("排除工时（h）")]
        public string Pggs { get; set; }

        [ExporterHeader(DisplayName = "故换件名称")]
        [Column(Name = "ghjmc")]
        [JsonProperty("ghjmc")]
        [Description("故换件名称")]
        public string Ghjmc { get; set; }

        [ExporterHeader(DisplayName = "故换件型号")]
        [Column(Name = "ghjxh")]
        [JsonProperty("ghjxh")]
        [Description("故换件型号")]
        public string Ghjxh { get; set; }

        [ExporterHeader(DisplayName = "故换件号码")]
        [Column(Name = "ghjhm")]
        [JsonProperty("ghjhm")]
        [Description("故换件号码")]
        public string Ghjhm { get; set; }

        [ExporterHeader(DisplayName = "故换件使用时间（h）")]
        [Column(Name = "ghjsysj")]
        [JsonProperty("ghjsysj")]
        [Description("故换件使用时间（h）")]
        public string Ghjsysj { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("created")]
        public DateTime Created { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("updated")]
        public DateTime Updated { get; set; }
    }
}
